package com.wzx.user.pojo;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;

/**
 * @author wzx
 * @version 1.0
 * @date 2023/2/8 - 0:20
 * @description 请求消息
 */
@Data
public class MsgReq {
    /**
     * 1，第一次连接参数
     */
    private Integer userId;
    private String username;
    private String password;

    /**
     * 2，聊天相关参数
     *  主键id
     */
    @Id
    private long id;
    //消息递增数
    private Integer tip = 0;
    //消息类型（1：第一次连接；4：好友聊天）
    private Integer chatType = 0;

    //发送者id
    @Indexed
    private Integer senderId = 0;
    //发送者昵称
    private String senderName = "";
    //发送者头像
    private String senderHead = "";
    //接收者id
    @Indexed
    private Integer receiverId = 0;
    private String receiverName = "";
    private String receiverHead = "";
    //聊天内容
    private String message;
    //消息类型
    private Integer types;
    //发送时间
    private String time;
    //消息状态（默认为0）
    private String state = "0";

    /**
     * 3，群聊参数
     */
    //创建者id
    private Integer createId = 0;
    private Integer groupId = 0;
    private String groupName = "";
    private String groupHead = "";
    private String createGroupName = "";
    private String userIds = "";


    /**
     * 4，系统消息
     */
    private String addId = "";
    /**
     * 创建时间
     */
    private String createTime;
    /**
     * 系统消息类型：
     * 2：好友
     * 3：群聊
     */
    private String sysType;

    //红包id
    private long redPkgId;

}
